package Chapter05;

public class Zuoye8 {
    public static void main(String[] args) {
        int[] a={1,2,3,4};
        int b=0,c=1;
        for (int i=0;i<a.length;i++){
            b+=a[i];
            c*=a[i];
        }
        System.out.println("和是:"+b+",乘机是:"+c);
    }
}
